package com.ybw.mybatis.multi.tenant.controller;


import com.ybw.mybatis.multi.tenant.config.TenantContext;
import com.ybw.mybatis.multi.tenant.dto.TenantDTO;
import com.ybw.mybatis.multi.tenant.entity.User;
import com.ybw.mybatis.multi.tenant.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author ybw
 * @since 2022-01-10
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    private UserService userService;

    @GetMapping("/getUser")
    public List<User> getUser() {
        return userService.lambdaQuery().list();
    }
}

